import request from '@/utils/request'
export default {
    //返回章节和小节
    addCourseInfo(courseId) {
        return request({
            url: '/eduservice/chapter/getChapterVideo/'+courseId,
            method: 'get'
          })
    },
    addChapter(chapter) {
        return request({
            url: '/eduservice/chapter/addChapter',
            method: 'post',
            data: chapter
          })
    },
    getChapterById(chaptereId) {
        return request({
            url: '/eduservice/chapter/getChapter/'+chaptereId,
            method: 'get'
          })
    },
    updateChapter(chapter) {
        return request({
            url: '/eduservice/chapter/updateChapter',
            method: 'post',
            data: chapter
          })
    },
    deleteChapter(chaptereId) {
        return request({
            url: '/eduservice/chapter/deleteChapter/'+chaptereId,
            method: 'delete'
          })
    }
}